package base;

public class ListNode {

    public int val;

    public ListNode next;

    public ListNode() {

    }

    public ListNode(int val) {
        this.val = val;
    }

    public ListNode(int val, ListNode next) {
        this.val = val;
        this.next = next;
    }

    public ListNode(int[] numArray) {
        ListNode listNode = null;
        if(numArray.length > 0) {
            for(int size = numArray.length - 1; size >= 0; size--) {
                
            }
        }
    }

    public String simpleString() {
        StringBuffer buffer = new StringBuffer();
        buffer.append("[").append(val);
        ListNode bufferNext = next;
        for(;bufferNext != null;) {
            buffer.append(", ").append(bufferNext.val);
            bufferNext = bufferNext.next;
        }

        buffer.append("]");

        return buffer.toString();
    }
}
